package com.sky.mapper;

import com.sky.anotation.AutoFill;
import com.sky.entity.SetmealDish;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
    /*
    * 通过传入一组菜品的id找到相应的套餐
    * */
    List<SetmealDish> getSetmealDishByIds(List<Long> ids);

    void insertBatch(List<SetmealDish> setmealDishes);
     @Delete("delete from setmeal_dish where setmeal_id=#{id}")
    void deleteBySetmealId(Long id);

//     通过setmealId 查询相应的套餐
    @Select("select  * from setmeal_dish where setmeal_id = #{id}")
    List<SetmealDish> getBySetmealId(Long id);

    void deleteBySetmealIds(List<Long> ids);
}
